/***************************************************************************
 *  Filename: parsaxremotecontrol.h
 *  Class: ParsaxRemoteControl
 *
 *  Copyright 2012  Xander van Kooten
 *  <xandervk@gmail.com>
 *
 *  Copyright 2012  Mario Henrique Voorsluys
 *  <forcaeluz@gmail.com>
 *
 ****************************************************************************/

/*
 *
 * This file is part of Parsax-Remote-Controller.
 *
 *    Parsax-Remote-Controller is free software: you can redistribute it
 *    and/or modify it under the terms of the GNU General Public License
 *    as published by the Free Software Foundation, either version 3 of the
 *    License, or (at your option) any later version.
 *
 *    Parsax-Remote-Controller is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU General Public License for more details.
 *
 *    You should have received a copy of the GNU General Public License
 *    along with Parsax-Remote-Controller.
 *    If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef PARSAXREMOTECONTROL_H
#define PARSAXREMOTECONTROL_H

#include <QMainWindow>
#include <QSettings>
#include "computerwidget.h"
#include "processgui.h"
#include "processmodel.h"

namespace Ui {
class ParsaxRemoteControl;
}

class ParsaxRemoteControl : public QMainWindow
{
    Q_OBJECT
    
public:
    explicit ParsaxRemoteControl(QWidget *parent = 0);
    ~ParsaxRemoteControl();
    void addComputer();
    void addComputer(ComputerWidget *cmpWidget);
    void addComputer(QString name, QString address, int port);
    void removeComputer(int index);
    void loadSettings();
    void saveSettings();
private:
    Ui::ParsaxRemoteControl *ui;
    QList<ComputerWidget*> computers;
    ProcessModel *processes;

private slots:
    void processAdded(ProcessGUI *prcs);
    void processRemoved(ProcessGUI *prcs);
    void computerRenamed(ComputerWidget* pc, QString name);
    void on_actionExit_triggered();
    void on_actionAdd_Computer_triggered();
    void on_tableView_customContextMenuRequested(const QPoint &pos);
};

#endif // PARSAXREMOTECONTROL_H
